我想要用這個工具來看SQL等等的debug訊息
但是我怎麼用他都不會出現那條展示列
如果有高手看到這篇文章也麻煩指導一下
首先用pip安裝
python -m pip install django-debug-toolbar
加入app
并將middleware加入到第一個
加入IP位置
docsystem_5/settings.py
INSTALLED_APPS = [
'django.contrib.staticfiles',
'debug_toolbar',
]
MIDDLEWARE = [
## django-debug_toolbar
'debug_toolbar.middleware.DebugToolbarMiddleware',
]
INTERNAL_IPS = [
'127.0.0.1',
]
加入路徑
docsystem_5/urls.py
import debug_toolbar
from django.contrib import admin
from django.urls import include, path
from django.conf import settings
urlpatterns = [
path('admin/', admin.site.urls),
path('accounts/', include('allauth.urls'), name='allauth'),
path('accounts/', include('auth_info.urls')),
path('',include('doc_info.urls')),
path('health/', include('health_check.urls')),
path('__debug__/', include(debug_toolbar.urls)),
]